<?
//inculde即可以使用data数据。本页所有的data数据，倾在controller都处理好
include_once("../../../common/module/checkA.php");
include_once("../../../../config.php");
include_once("../controller/edit.php");
?>





<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <link href="../css/<? echo $theme_folder ?>/user.css" rel="stylesheet" type="text/css"/>
    <?php include ROOT_PATH_.'/controller/common/module/head.php'; ?>
    <?php include 'modules/head.php'; ?>
</head>


<body>

<div id="topbar">
    <?php include ROOT_PATH_.'/controller/common/module/topbar.php'; ?>
</div>

<div id="container" class="<? echo $system_part ?>">

    <div id="maincontent">

        <div id="sidebar">
            <?php include ROOT_PATH_.'/controller/common/module/sidebar.php'; ?>
        </div>


        <div id="content">
            <?php $page_title='网站设置';?>
            <?php include ROOT_PATH_.'/controller/common/module/mod-page-title.php'; ?>


            <blockquote class="layui-elem-quote">基础设置多数是对外使用的资料，请细心填写。</blockquote>
            <br/>


<div class="site detail-box layui-form">
<div class="detail-boxes">
<ul class="detail-boxing">


<form id="site_info" method="post"
      action="save.php" enctype="multipart/form-data"
      name="uploadfile"
      class="layui-form-pane">





    <fieldset class="layui-elem-field layui-field-title" >
        <legend>基础设置</legend>
    </fieldset>



    <div class="layui-form-item site-name">
        <label class="layui-form-label">网站名称 : </label>
        <div class="layui-input-block">
            <input type="text" name="site_name"  autocomplete="off"  class="layui-input" value="<?php echo $detail['name'] ?>">
        </div>

    </div>



    <div class="layui-form-item pc-domain">
        <label class="layui-form-label">电脑端域名 : </label>
        <div class="layui-input-block">
            <input type="text" name="site_domin"  autocomplete="off" placeholder="填写正确的网站域名(即网址）,例：http://www.circledesign.cn" class="layui-input" value="<? echo $detail['domin'] ?>">
        </div>

    </div>

    <div class="layui-form-item mob-domain">
        <label class="layui-form-label">移动端网址 : </label>
        <div class="layui-input-block">
            <input type="text" name="ai_mobile_domain"  autocomplete="off" placeholder="请输入完整移动端网址，需要填写http://开头" class="layui-input" value="<? echo $detail['mobile_domain'] ?>">
        </div>

    </div>

    <div class="layui-form-item en-domain">
        <label class="layui-form-label">英文版域名 : </label>
        <div class="layui-input-block">
            <input type="text" name="site_subdomain"  autocomplete="off" placeholder="填写英文版的域名" class="layui-input" value="<? echo $detail['subdomain'] ?>">
        </div>
    </div>
 
    <div class="layui-form-item cn-pc-domain">
        <label class="layui-form-label">中文简体域名 : </label>
        <div class="layui-input-block">
            <input type="text" name="site_chdomin"  autocomplete="off" placeholder="填写中文简体版的域名" class="layui-input" value="<? echo $detail['chdomin'] ?>">
        </div>
    </div>

    <div class="layui-form-item hk-pc-domain">
        <label class="layui-form-label">中文繁体域名 : </label>
        <div class="layui-input-block">
            <input type="text" name="site_chwdomin"  autocomplete="off" placeholder="填写中文繁体版的域名" class="layui-input" value="<? echo $detail['chwdomin'] ?>">
        </div>
    </div>

    <div class="layui-form-item span-pc-domain">
        <label class="layui-form-label">西班牙文域名 : </label>
        <div class="layui-input-block">
            <input type="text" name="site_spdomin"  autocomplete="off" placeholder="填写西班牙文版的域名" class="layui-input" value="<? echo $detail['spdomin'] ?>">
        </div>
    </div>
    <div class="layui-form-item jp-pc-domain">
        <label class="layui-form-label">日文域名 : </label>
        <div class="layui-input-block">
            <input type="text" name="site_jpdomin"  autocomplete="off" placeholder="填写日文版的域名" class="layui-input" value="<? echo $detail['jpdomin'] ?>">
        </div>
    </div>
    <div class="layui-form-item koe-pc-domain">
        <label class="layui-form-label">韩文域名 : </label>
        <div class="layui-input-block">
            <input type="text" name="site_krdomin"  autocomplete="off" placeholder="填写韩文版的域名" class="layui-input" value="<? echo $detail['krdomin'] ?>">
        </div>
    </div>
    
    <div class="layui-form-item en-mob-domain">
        <label class="layui-form-label">英文手机版域名 : </label>
        <div class="layui-input-block">
            <input type="text" name="site_m_subdomin"  autocomplete="off" placeholder="填写英文手机版的域名" class="layui-input" value="<? echo $detail['m_subdomain'] ?>">
        </div>
    </div>
 
    <div class="layui-form-item cn-mob-domain">
        <label class="layui-form-label">中文简体手机域名 : </label>
        <div class="layui-input-block">
            <input type="text" name="site_m_chdomin"  autocomplete="off" placeholder="填写中文简体手机版的域名" class="layui-input" value="<? echo $detail['m_chdomin'] ?>">
        </div>
    </div>

    <div class="layui-form-item hk-mob-domainm">
        <label class="layui-form-label">中文繁体手机域名 : </label>
        <div class="layui-input-block">
            <input type="text" name="site_m_chwdomin"  autocomplete="off" placeholder="填写中文繁体手机版的域名" class="layui-input" value="<? echo $detail['m_chwdomin'] ?>">
        </div>
    </div>

    <div class="layui-form-item span-mob-domain">
        <label class="layui-form-label">西班牙文手机域名 : </label>
        <div class="layui-input-block">
            <input type="text" name="site_m_spdomin"  autocomplete="off" placeholder="填写西班牙文手机版的域名" class="layui-input" value="<? echo $detail['m_spdomin'] ?>">
        </div>
    </div>
    <div class="layui-form-item jp-mob-domain">
        <label class="layui-form-label">日文手机域名 : </label>
        <div class="layui-input-block">
            <input type="text" name="site_m_jpdomin"  autocomplete="off" placeholder="填写日文手机版的域名" class="layui-input" value="<? echo $detail['m_jpdomin'] ?>">
        </div>
    </div>
    <div class="layui-form-item koe-mob-domain">
        <label class="layui-form-label">韩文手机域名 : </label>
        <div class="layui-input-block">
            <input type="text" name="site_m_krdomin"  autocomplete="off" placeholder="填写韩文手机版的域名" class="layui-input" value="<? echo $detail['m_krdomin'] ?>">
        </div>
    </div>






<div class="layui-form-item auto-switch">
    <label class="layui-form-label">自动跳转 : </label>
    <div class="layui-input-block">
        <input type="checkbox" name="ai_mobile_switch" lay-skin="switch" placeholder="开启自动跳转时，系统能检测用户客户端，自动跳转访问到移动端网站。" lay-text="ON|OFF" value="1"
            <? if($detail['mobile_switch']){echo "checked=''";}?>>
    </div>
</div>










    <li class="logo"><label>网站标识：</label>
        <? if($detail['logo']){ ?>
            <img src="../../uploadfiles/<? echo $theme_folder ?>/<? echo $detail['logo'] ?>" width="100" style="border:solid 1px #ececec; background-color:#ececec"/>
        <? }
        else
        { echo "暂无资料";}
        ?>
    </li>



    <li class="logo"><label>上传文件：</label><input type="file" name="site_logo" onchange="fileChange(this);"/>
        <em class="explain">上传网站首页顶部LOGO</em><br/><br/></li>





    <li class="logo2"><label>网站标识2：</label>
        <? if($detail['logo2']){ ?>
            <img src="../../uploadfiles/<? echo $theme_folder ?>/<? echo $detail['logo2'] ?>" width="100" style="border:solid 1px #ececec; background-color:#ececec"/>
        <? }
        else
        { echo "暂无资料";}
        ?>
    </li>



    <li class="logo2"><label>上传文件：</label><input type="file" name="site_logo2" onchange="fileChange(this);"/>
        <em class="explain">(上传网站LOGO，一般用于网站底部。)</em><br/><br/></li>



    <li class="browser-icon"><label>网站图标：</label>
        <? if($detail['icon']){ ?>
            <img src="../../uploadfiles/<? echo $theme_folder ?>/<? echo $detail['icon'] ?>" width="100"  style="border:solid 1px #ececec;background-color:#ececec"/>
        <? }

        else
        { echo "暂无资料";}
        ?>
    </li>
    <li class="browser-icon"><label>上传文件：</label><input type="file" name="site_icon"  onchange="fileChange(this);"/><em class="explain">上传浏览器标签页显示的网站LOGO</em><br/><br/></li>





	<fieldset class="layui-elem-field layui-field-title search_title" >
        <legend>搜索关键字设置</legend>
    </fieldset>



    <div class="layui-form-item search_default" style="display:none">
        <label class="layui-form-label">默认关键词 : </label>
        <div class="layui-input-block">
            <input type="text" name="site_search_default"  autocomplete="off"  class="layui-input" value="<?php echo $detail['search_default'] ?>">
        </div>
		<em class="explain">默认点击空白搜索后的关键词</em>
    </div>
    
    <div class="layui-form-item search_placeholder">
        <label class="layui-form-label">提示关键词 : </label>
        <div class="layui-input-block">
            <input type="text" name="site_search_placeholder"  autocomplete="off"  class="layui-input" value="<?php echo $detail['search_placeholder'] ?>">
        </div>
        <em class="explain">搜索框提示的关键词</em>
    </div>
    
    <div class="layui-form-item hot-key-switch">
        <label class="layui-form-label"  title="开启热门关键词">开启热门关键词 : </label>
        <div class="layui-input-block">
            <input type="radio" name="site_show_hot_search" value="0" title="不显示"  <?php  if($detail['show_hot_search'] == 0){echo 'checked';} ?>>
            <input type="radio" name="site_show_hot_search" value="1" title="显示"  <?php  if($detail['show_hot_search'] == 1){echo 'checked';} ?>>
        </div>
    </div>
    
    <div class="layui-form-item show_true_hot_search" style="display:none;" >
        <label class="layui-form-label" title="开启真实热门关键词">开启真实热门关键词 : </label>
        <div class="layui-input-block">
            <input type="radio" name="site_show_true_hot_search" value="0" title="不显示"  <?php  if($detail['show_true_hot_search'] == 0){echo 'checked';} ?>>
            <input type="radio" name="site_show_true_hot_search" value="1" title="显示"  <?php  if($detail['show_true_hot_search'] == 1){echo 'checked';} ?>>
            
        </div>
        <em class="explain">开启后会用后台记录到的关键词来做一个排行，热门词设置就会失效</em>
    </div>
    
    <div class="layui-form-item hot-key-number" >
        <label class="layui-form-label" title="热门关键词显示数量">热门关键词显示数量 : </label>
        <div class="layui-input-block">
            <input type="text" name="site_show_hot_search_number"  autocomplete="off"  class="layui-input" value="<?php echo $detail['show_hot_search_number'] ?>">
        </div>
        <em class="explain">热门关键词显示数量</em>
    </div>
    
    <div class="layui-form-item hot-key">
        <label class="layui-form-label">热门关键词 : </label>
        <div class="layui-input-block">
            <input type="text" name="site_hot_search"  autocomplete="off"  class="layui-input" value="<?php echo $detail['hot_search'] ?>">
        </div>
        <em class="explain">请用英文逗号,来区分开关键词,排序按照输入优先</em>
    </div>








    <fieldset class="layui-elem-field layui-field-title seo_title" style="margin-top: 60px;">
        <legend>SEO(搜索引擎优化)相关设置</legend>
    </fieldset>


    <div class="layui-form-item site_title">
        <label class="layui-form-label">网站标题 : </label>
        <div class="layui-input-block">
            <input type="text" name="site_title"  autocomplete="off"  class="layui-input" value="<? echo $detail['title'] ?>">
        </div>
        <em class="explain">将于浏览器标签页显示的网站名称</em>
    </div>



    <div class="layui-form-item site_description">
        <label class="layui-form-label">网站描述 : </label>
        <div class="layui-input-block">
            <input type="text" name="site_description"  autocomplete="off"  class="layui-input" value="<? echo $detail['description'] ?>">
        </div>
        <em class="explain">填写网站描述性文字，用于搜索引擎的搜索结果显示</em>
    </div>



    <div class="layui-form-item site_keyword">
        <label class="layui-form-label">网站关键词 : </label>
        <div class="layui-input-block">
            <input type="text" name="site_keyword"  autocomplete="off"  class="layui-input" value="<? echo $detail['keyword'] ?>">
        </div>
        <em class="explain">填写网站关键词，多个关键词用逗号，空格或分号分隔。利于搜索引擎抓取</em>
    </div>




<?//在各大板块已经又设置，着部分就不适用了。
/*?>
    <div class="layui-form-item">
        <label class="layui-form-label">显示层级 : </label>
        <div class="layui-input-block">
<input type="checkbox" name="seo_level[]" lay-skin="primary" title="网站首页" value="index"
    <?if(strpos($detail['seo_level'],"index") !==false){echo "checked";} ?> >
<input type="checkbox" name="seo_level[]" lay-skin="primary" title="分类页面" value="term"
    <?if(strpos($detail['seo_level'],'term') !==false){echo "checked";} ?> >
<input type="checkbox" name="seo_level[]" lay-skin="primary" title="列表页面" value="list"
    <?if(strpos($detail['seo_level'], 'list') !==false){echo "checked";} ?> >
<input type="checkbox" name="seo_level[]" lay-skin="primary" title="详情页面" value="detail"
    <?if(strpos($detail['seo_level'],'detail') !==false){echo "checked";} ?>>
<input type="checkbox" name="seo_level[]" lay-skin="primary" title="其他页面" value="other"
    <?if(strpos($detail['seo_level'],'other') !==false){echo "checked";} ?> >
        </div>
        <em class="explain">网站的SEO信息会在相关的页面显示。其他页面包含:独立页面，例如留言，信息通知，搜索等页面。</em>
    </div>
*/?>





    <fieldset class="layui-elem-field layui-field-title notice_title" style="margin-top: 60px;">
        <legend>通讯设置</legend>
    </fieldset>




    <blockquote class="layui-elem-quote notice_title">填写接收网站更新、客户留言等通知的邮箱、手机号</blockquote>


<div class="layui-form-item mail1">
<label class="layui-form-label">通知邮箱1：</label>
<div class="layui-input-block">
<input type="text" name="site_mmail01" size="20" value="<?php echo $detail['mmail01'] ?>"
onblur="chkEmail(site_mmail01)" class="layui-input"  >
</div>
</div>


<div class="layui-form-item mail2" >
<label class="layui-form-label">通知邮箱2：</label>
<div class="layui-input-block">
<input type="text" name="site_mmail02" size="20"
value="<?php echo $detail['mmail02'] ?>" onblur="chkEmail(site_mmail02)" class="layui-input"  >
</div>
</div>


<div class="layui-form-item mail3">
<label class="layui-form-label">通知邮箱3：</label>
<div class="layui-input-block">
<input type="text" name="site_mmail03" size="20"
value="<?php echo $detail['mmail03'] ?>" onblur="chkEmail(site_mmail03)" class="layui-input"  >
</div>
</div>


<div class="layui-form-item mail4">
    <label class="layui-form-label">通知邮箱4：</label>
    <div class="layui-input-block"><input type="text" name="site_mmail04" size="20"
value="<?php echo $detail['mmail04'] ?>"
onblur="chkEmail(site_mmail04)") class="layui-input"  >
    </div>
</div>


<div class="layui-form-item mail5"><label class="layui-form-label">通知邮箱5：</label>
    <div class="layui-input-block">
        <input type="text" name="site_mmail05" size="20"
value="<?php echo $detail['mmail05'] ?>"
onblur="chkEmail(site_mmail05)" class="layui-input"  >
    </div>
</div>






<div class="layui-form-item sms1">
<label class="layui-form-label">短信通知1：</label>
<div class="layui-input-block">
<input type="text" name="site_msms01" size="20" value="<?php echo $detail['msms01'] ?>" onkeydown="onlyNum();"class="layui-input"  >
</div>
</div>
<div class="layui-form-item sms2"><label class="layui-form-label">短信通知2：</label>    <div class="layui-input-block"><input type="text" name="site_msms02" size="20"
value="<?php echo $detail['msms02'] ?>" onkeydown="onlyNum();"class="layui-input"  >
</div>
</div>
<div class="layui-form-item sms3"><label class="layui-form-label">短信通知3：</label>    <div class="layui-input-block"><input type="text" name="site_msms03" size="20"
value="<?php echo $detail['msms03'] ?>" onkeydown="onlyNum();"class="layui-input"  >
</div>
</div>
<div class="layui-form-item sms4"><label class="layui-form-label"> 短信通知4：</label>   <div class="layui-input-block"><input type="text" name="site_msms04" size="20"
value="<?php echo $detail['msms04'] ?>" onkeydown="onlyNum();"class="layui-input"  >
</div>
</div>
<div class="layui-form-item sms5"><label class="layui-form-label"> 短信通知5：</label>   <div class="layui-input-block"><input type="text" name="site_msms05" size="20"
value="<?php echo $detail['msms05'] ?>" onkeydown="onlyNum();"class="layui-input"  >
</div>
</div>




    <fieldset class="layui-elem-field layui-field-title setup_title" style="margin-top: 60px;">
        <legend>系统设置</legend>
    </fieldset>





    <div class="layui-form-item site_admin_url">
        <label class="layui-form-label">管理地址 : </label>
        <div class="layui-input-block">
            <input type="text" name="site_admin_url"  autocomplete="off" placeholder="请输入完整移动端网址，需要填写http://开头" class="layui-input" value="<? echo $detail['admin_url'] ?>">
        </div>
        <em class="explain">网站后台管理地址</em>
    </div>



    <div class="layui-form-item storage">
        <label class="layui-form-label">存储空间 : </label>
        <div class="layui-input-block">
            <input type="text" name="site_storage"  autocomplete="off" placeholder="请输入完整移动端网址，需要填写http://开头" class="layui-input" value="<? echo $detail['storage'] ?>">
        </div>
        <em class="explain">网站外链地址，用于外链图片或文件。请在技术人员指导下修改</em>
    </div>


	<div class="layui-form-item site_video_url">
        <label class="layui-form-label">视频链接 : </label>
        <div class="layui-input-block">
            <input type="text" name="site_video_url"  autocomplete="off" placeholder="请输入完整视频网址，需要填写http://开头" class="layui-input" value="<? echo $detail['video_url'] ?>">
        </div>
        <em class="explain">视频地址，用于不同途径的播放。</em>
    </div>
	
    <div class="layui-form-item site_video_file">
        <label class="layui-form-label">本地视频 : </label>
        <div class="layui-input-block">
            <input type="text" name="site_video_file" readonly="readonly" class="layui-input video_file" value="<? echo $detail['video_file'] ?>">
        </div>
        <em class="explain">(PS：视频上传后会覆盖原先视频。)</em>
    </div>
    
    <div class="layui-form-item site_video_file">
        <label class="layui-form-label">上传文件 : </label>
        <div class="layui-input-block">
            <button type="button" class="layui-btn" id="test1" name="test_file" lay-data="{ accept: 'video'}">
              <i class="layui-icon">&#xe67c;</i>上传视频
            </button>
        </div>
        <em class="explain">(视频上传格式：格式：MP4)</em>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">管理员模式</label>
        <div class="layui-input-block">
            <input type="radio" id="modelON" name="modelON" lay-filter="modelON" value="ON" title="开">
            <input type="radio" id="modelOFF"  name="modelON" lay-filter="modelON" value="OFF" title="关" >
        </div>
    </div>

    <hr/>

<div class="function">
<input type="submit" class="layui-btn" value="确认"/>
<input type="reset" class="layui-btn" value="重置"/>
</div>



                        </form>


                    </ul>
                </div>
            </div>

            <!--content端點01-->
        </div>
        <!--maincontent端點01-->
        <br class="clearfloat"/>
    </div>
    <!--container端點01-->
</div>

<script>

    layui.use('form', function(){
        var form = layui.form;
        form.on('radio(modelON)', function(data){
            if(data.value == 'ON'){
                $.cookie("administrator_mode","true",{path: '/controller' })
                console.log($.cookie("administrator_mode"))
            }else{
                $.cookie("administrator_mode","",{path: '/controller' })
                console.log($.cookie("administrator_mode"))
            }
        });

    });

        if($.cookie("administrator_mode")){
            $("#modelON").attr("checked","checked");
        }else{
            $("#modelOFF").attr("checked","checked");
        }


layui.use('upload', function(){
  var upload = layui.upload;
   
  //执行实例
  var uploadInst = upload.render({
    elem: '#test1' //绑定元素
    ,url: '/api/uplpad_video.php?theme_folder=<?php echo $theme_folder?>' //上传接口
	  ,before: function(obj){ //obj参数包含的信息，跟 choose回调完全一致，可参见上文。
		index= layer.load(); //上传loading
	  }
    ,done: function(res){
      //上传完毕回调
	     $('.video_file').val(res.src)
		  layer.msg(res.msg); 
		  layer.close(index);
		
    }
    ,error: function(){
      //请求异常回调
    }
  });
});
</script>
<?php include  ROOT_PATH_."/controller/module/footer.php"; ?>

</body>
</html>
